package com.zr.serviceimpl;

import java.util.Iterator;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.zr.dao.DeliverypointDaoLPN;
import com.zr.dao.DistributionscopeDaoLPN;
import com.zr.service.DistributionscopeServiceLPN;
import com.zr.vo.Dp_DsVO;
import com.zr.vo.Drp_dpVO;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
@Service("DistributionscopeServiceLPN")
public class DistributionscopeServiceImplLPN implements DistributionscopeServiceLPN{
	//属性注入
	@Resource
	private DistributionscopeDaoLPN dsDao ;
	
	@Override
	public JSONArray findDS(int dpId) {
	JSONArray j = new JSONArray();
	List<Dp_DsVO> dp = dsDao.findDS(dpId);
	for (Dp_DsVO dp_DsVO : dp) {
		JSONObject js=new JSONObject();		
		js.put("dsId",dp_DsVO.getDsId());
		js.put("dsName",  dp_DsVO.getDsName());
		js.put("dsDate",  dp_DsVO.getDsDate());
		js.put("dsRemarks", dp_DsVO.getDsRemarks());
		js.put("dpId", dp_DsVO.getDpId());		
		j.add(js);
	}
		
		return j;
	}
		
}
